//
//  BCTextFieldForPlaceHolder.m
//  NiuBanJinGold
//
//  Created by Billy on 15/10/23.
//  Copyright © 2015年 zzjr. All rights reserved.
//

#import "BCTextFieldForPlaceHolder.h"

@implementation BCTextFieldForPlaceHolder

// 颜色 字体大小等
- (void) drawPlaceholderInRect:(CGRect)rect {
    
    [[UsefulUtil colorWithHexString:@"#c7c7cd"] setFill];
    [[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:15.0]];
}

//// 输入文字显示的位置
//- (CGRect) textRectForBounds:(CGRect)bounds {
//    
//    CGRect inset = CGRectMake(bounds.origin.x , bounds.origin.y + bounds.size.height*1/3, bounds.size.width - MULTIPLYWIDTH(10.0), bounds.size.height);
//    
//    return inset;
//}

- (CGRect) placeholderRectForBounds:(CGRect)bounds {
    
    CGRect inset = CGRectMake(bounds.origin.x , bounds.origin.y + bounds.size.height*1/3, bounds.size.width - MULTIPLYWIDTH(10.0), bounds.size.height);
    
    return  inset;
}

//控制编辑文本的位置
-(CGRect)editingRectForBounds:(CGRect)bounds {

    return [super editingRectForBounds:bounds];;
}

@end
